home *** CD-ROM | disk | FTP | other *** search
-
- ANSI&2K.SYS and Function Key Assignments
-
- Bob Ketcham
-
- About ANSI.SYS
-
- One of the more powerful features of DOS 2.0 is the Extended Screen and
- Keyboard Control provided by the ANSI.SYS device driver. Using ANSI.SYS you
- can reassign the meaning of any key on the keyboard.
-
-
- A Bigger ANSI.SYS
-
- The power of ANSI.SYS is limited by the size of the buffer used to store
- keyboard reassignments. The original buffer size is approximately 200 bytes.
- ANSI&2K.SYS is a revised version of ANSI.SYS. The keyboard reassignment
- buffer has been enlarged by 2K (2048 BYTES).
-
-
- Installing ANSI&2K.SYS: The CONFIG.SYS File
-
- As stated above, ANSI&2K.SYS is an installable device driver.
- Installation of a device driver requires the use of a file called CONFIG.SYS.
- The CONFIG.SYS file's function is similar to that of the AUTOEXEC.BAT file.
- Like AUTOEXEC.BAT, the system looks for the CONFIG.SYS file on the disk with
- which the system is booted (started). In a manner similar to the way the
- system looks for and runs programs listed in the AUTOEXEC.BAT file, the
- system looks for and loads device drivers listed in the CONFIG.SYS file. A
- sample CONFIG.SYS file is provided with ANSI&2K.SYS. It should be copied
- (along with ANSI&2K.SYS) to the disk you use to start your system. When the
- machine is reset, ANSI&2K.SYS will be loaded as a device driver. Note if the
- file CONFIG.SYS is not found with this documentation, use an editor to create
- a file called CONFIG.SYS containing the line "DEVICE = ANSI&2K.SYS"
-
-
- Keyboard Reassignment Using The TYPE Command
-
- The documentation for this feature of DOS 2.0 is found in Chapter 13 of
- the DOS manual. It states "The control sequences defined below are valid
- only when issued through DOS function calls 1, 2, 6, and 9, ...". Simple,
- any novice knows what a DOS function call is. Well, its simpler than that.
- Any file which is displayed on the screen using the TYPE command is passed
- through one of the required function calls. A sample file, KEYS is provided
- along with this documentation file. After ANSI&2K.SYS is installed, the DOS
- command TYPE KEYS will assign a set of frequently used DOS commands to the
- forty combinations of function keys F1-F10, Shift, Ctrl, and Alt.
-
-
- Assigning and Displaying Function Key Assignments with KEYS
-
- The file KEYS consists of two primary sections. The first section
- contains the escape control sequences which are used by ANSI&2K.SYS to do the
- keyboard reassignments. When the TYPE command is used to display the file,
- this section will be invisible. (The screen will clear and the flicker of the
- cursor may be seen, but nothing more.)
-
- The second section displays the key assignment information to the user.
- Note that while cryptic commands may be assigned to the function keys, an
- english language translation may be displayed here.
-
-
- Modifying KEYS - Your Own Custom Keyboard
-
- An editor is required to modify KEYS. Three which can be used are
- EDLIN, FRED, or VEdit. Each has its advantages and disadvantages in this
- application.
-
- EDLIN is the DOS line editor provided with your copy of DOS. That is
- its advantage. If you use it, you will know its disadvantages.
-
- FRED is the FRee EDitor distributed using the Freeware concept. In
- addition to the advantage of being free, it is friendly, easy to use, and
- fast. It shares two disadvantages with EDLIN; it cannot be used to place the
- escape character (BASIC CHR$(27)) in a file, and it always places a carriage
- return and line feed at the end of the file. (KEYS will scroll the top line
- off the screen if there is a CR-LF at its end.) Note: although the Escape
- character cannot be inserted into a file with EDLIN or FRED; if it is already
- there (as it is in KEYS), the editors's copy functions may be used to move
- and duplicate it.
-
- VEdit is a powerful commercial editor, which can insert the Escape
- character into text. It will allow you to leave the CR-LF sequence off the
- end of the last line if desired. Additionally it is smaller than FRED, so it
- is convenient to place on most disks. However, many of its command syntaxes
- are cryptic. I would not recommend it to the novice.
-
-
- What's in KEYS - the ESCape Control Sequences
-
- KEYS contains ESCape control sequences similar to the examples on page
- 13-11 of the DOS manual. Sequences are provided for the forty combinations
- of function keys F1-F10, Shift, Ctrl, and Alt.
-
- Each sequence begins with the escape character. In the DOS manual this
- is shown as "ESC". Other representaions are:
- - BASIC - CHR$(27)
- - FRED - an arrow pointing left
- - VEdit - ^[ (one character)
- - Hexidecimal - 1B
- - Decimal - 27
- - Keyboard - Esc.
-
- Following the ESCape character is the left square bracket ([). Each
- control sequence for keyboard reassignment ends with a lower case p. Between
- [ and p are characters which identify the key to be reassigned and the
- reassignment to be made. For example the F1 key is assigned the string "Dir
- /p" followed by a carriage return. The control sequence to do this is:
-
- ESC[0;59;"Dir /p";13p
-
- where: represents:
-
- 0;59; the F1 key. It sends the system two characters when struck;
- A NUL (0) followed by decimal 59.
-
- "Dir /p"; obviously the string "Dir /p".
-
- 13 carriage return (decimal 13)
-
- Notice the use of the semicolon as a delimiter.
-
-
- Getting Back to Normal - NULLKEYS
-
- Another file of keyboard reassignment control sequences is provided. The
- command TYPE NULLKEYS will return the forty function combinations to their
- normal state.
-
-
- Suggested Use
-
- When used with a set of batch files, KEYS, ANSI&2K.SYS, and CONFIG.SYS
- can provide an excellent Main Menu on a hard disk system.
-
-
- Additional References:
-
- DOS 2.0 Manual, Chapter 13
-
- PC, Volume 2 Number 1, June 1983, page 423
-
- Softalk, August 1983, page 6
-
- PC, Volume 2 Number 6, November 1983, page 559
-
-